#!/bin/bash
trap 'echo Abort ; exit 1' ERR

echo Clean and Re-make Root FS Skeleton.

TARGET=arm-linux-gnueabi

rm /opt/armgcc/rootfs/ -rf
mkdir /opt/armgcc/rootfs/
cd /opt/armgcc/rootfs/
mkdir -p etc/init.d bin sbin usr/bin usr/include usr/games proc sys dev root home tmp
for i in 1 2 3 4 5 6 7 8
do
	mkdir -p usr/share/man/man$i
done
cp -a /opt/armgcc/kernelmodule/lib .
cp -a /opt/armgcc/armroot/lib .
cp -a /opt/armgcc/armroot/usr/$TARGET/lib usr/
cp -a /opt/armgcc/armroot/usr/lib usr/
set -x
#sudo mknod dev/console c 5 1
#sudo mknod dev/null c 1 3
